package com.chixing.day09_innerclass.homework;

public class HomeWork {
    public static void main(String[] args) {
        String word = "War change world";
        char[] arr = word.toCharArray();
        String upWords = word.toUpperCase();
        String lowerWords = word.toLowerCase();
        System.out.println(upWords);
        System.out.println(lowerWords);

        int i = word.indexOf("a");
        System.out.println(i);

        for (int j = 0; j <arr.length ; j++) {
            System.out.println(arr[j]);
        }

        String s1 = "hello";
        String s2 = "java";
        String s3 = s1 + s2;
        System.out.println(s3);

        String change = word.replaceAll("a","Z");
        System.out.println(change);

        for (int j = 0; j <arr.length ; j++) {
            if (arr[j]=='a'){
                System.out.println(j);
            }
        }

        String words = "clone-finalize-getClass-notify-notifyAll-wait";
        String words1 = words.replaceAll("-"," ");
        String res[] = words1.split(" ");
        for (int j = 0; j <res.length ; j++) {
            System.out.println(res[j]);
        }

        int num = 76 ;
        String str3 = String.valueOf(num);
        System.out.println(str3);

        double num1 = 57.8;
        String str4 = String.valueOf(num1);
        System.out.println(str4);
    }
}
